package com.naiterui.ehp.ps.schedule.vo;

import java.io.Serializable;
import java.util.Map;

import javax.validation.constraints.NotEmpty;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 调度任务类
 *
 * @author Gaoll
 * @since HZD-1.0.0
 */
@SuppressWarnings("unused")
public class ScheduleJobVO implements Serializable {

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -6798153039624729495L;

    /**
     * 任务名：<code>name</code>
     */
    @NotEmpty(message = "任务名称不能为null")
    private String name;

    /**
     * 任务组：<code>group</code>
     */
    @NotEmpty(message = "任务组不能为null")
    private String group;

    /**
     * cron表达式：<code>cronExpression</code>
     */
    @NotEmpty(message = "cron表达式不能为null")
    private String cronExpression;

    /**
     * 状态：<code>status</code>
     */
    private String status;

    /**
     * 描述：<code>description</code>
     */
    private String description;

    /**
     * 要执行的任务类路径名：<code>className</code>
     */
    private String className;

    /**
     * 请求地址
     */
    @NotEmpty(message = "请求地址不能为null")
    private String url;

    /**
     * 请求方法
     */
    private String method;

    /**
     * 请求参数
     */
    private Map<String, String> parameter;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGroup() {
        return this.group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCronExpression() {
        return this.cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getClassName() {
        return this.className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMethod() {
        return this.method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Map<String, String> getParameter() {
        return this.parameter;
    }

    public void setParameter(Map<String, String> parameter) {
        this.parameter = parameter;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
